import 'package:islandingclub/net/result_data.dart';

/// Http请求结果异常
class ResultError implements Exception {
  // 异常状态
  int errorCode;

  // 异常信息
  String errorMessage;

  // api名称
  String apiName;

  ResultError(this.errorCode, this.errorMessage, {this.apiName});

  ResultError.fromJson(ResultData resultData, {this.apiName}) {
    this.errorCode = resultData.code;
    this.errorMessage = resultData.msg;
  }
}
